package projeto.pitaqueiro;

import javax.swing.*;

import projeto.desenvolvimento.ManipulaEstabelecimento;
import projeto.desenvolvimento.ManipulaUsuario;


public class Executa extends JFrame {	
	
	private static JPanel painelBase = new JPanel();
	private static Inicializa inicio = new Inicializa();
	
	
	public Executa(){
		super("Pitaqueiro");		
	    painelBase.add(new MenuPrincipal());		
		getContentPane().add(painelBase);
		setSize(500,300);
		setVisible(true);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	
	public static void trocaPainel(JPanel painel){			
		painelBase.removeAll();
		painelBase.repaint();
		painelBase.add(painel);
		painelBase.validate();		
	}
	
	public static ManipulaUsuario listaUsuarios(){
		return inicio.getListaUsuario();
	}	
	
	public static ManipulaEstabelecimento listaEstabelecimentos(){
		return inicio.getListaEstabelecimento();
	}
	
	public static void main(String[] args) {
		
		
		new Executa();
		
		
		
	}

}
